<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>路况共享</title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link rel="stylesheet" type="text/css" href="iconfont/iconfont.css" />
		<link rel="stylesheet" type="text/css" href="css/all_css.css" />
		<link rel="stylesheet" type="text/css" href="css/weui/base.css" />
		<link rel="stylesheet" type="text/css" href="lib/weui.css" />
		<link rel="stylesheet" type="text/css" href="css/weui/jquery-weui.css" />
		<link rel="stylesheet" type="text/css" href="css/loadingCss/fakeloader.css" />
		<link rel="stylesheet" type="text/css" href="css/loadingCss/loading_css.css" />
		<style type="text/css">
			body {
				width: 100%;
				overflow-y: auto;
			}
			
			@media only screen and (max-width: 350px) {
				* {
					font-size: 0.95em;
				}
			}
			
			.roadSharing_main {
				max-width: 640px;
				min-width: 310px;
				margin: 0px auto;
				padding-bottom: 10px;
				margin-top: 20px;
			}
			
			.app_head_left {
				float: left;
				width: 8%;
				padding-top: 6px;
				padding-left: 6px;
			}
			
			.app_head_left a {
				color: #FFFFFF;
				font-size: 1.5em;
				font-weight: bold;
			}
			
			.app_head_mid {
				float: left;
				width: 57%;
				padding-top: 5px;
			}
			
			.app_head_right {
				float: right;
				width: 35%;
				text-align: right;
				padding-top: 10px;
				height: 100%;
				line-height: 25px;
			}
			
			.app_head_right img {
				width: 27px;
				margin-top: -4px;
			}
			
			.app_head_title {
				text-align: right;
				color: #FFFFFF;
				font-size: 1.6em;
				font-family: "宋体";
				font-weight: bold;
			}
			/* 底部发送信息输入框 */
			
			#sendInput_main {
				border-top: 1px solid #DEDEDE;
				height: 58px;
			}
			
			#sendInput_main div {
				height: 75%;
				margin-top: 8px;
			}
			
			.inputBorder {
				float: left;
				border: 1px solid #0070B4;
				border-radius: 8px;
				margin-left: 3%;
				width: 72%;
				text-align: center;
			}
			
			.btnSend {
				float: left;
				width: 25%;
			}
			
			#sendRoadSharingBtn {
				display: block;
				float: left;
				width: 80%;
				height: 95%;
				margin-left: 8%;
				border-radius: 10px;
				text-align: center;
				line-height: 40px;
				font-size: 1.15em;
				background-color: #007AFF;
				color: #FFFFFF;
				font-family: Tahoma, fzltxhk, "\5fae\8f6f\96c5\9ed1";
			}
			
			#sendRoadSharingMain {
				width: 90%;
				height: 100%;
				border: none;
				outline: none;
				color: #666666;
				font-size: 1.1em;
			}
			
			#nullDataImg {
				width: 50%;
				margin-top: 100px;
				margin-left: 25%;
				margin-right: 25%;
			}
			
			.collectDelBtn {
				float: right;
				width: 6%;
				margin-top: 12px;
				margin-right: 5px;
			}
			/* 删除完成按钮 */
			
			#delSharingFinishBtn {
				font-size: 1.3em;
			}
			/* loading 图标 */
			
			#sharingLoadingIcon {
				width: 8%;
				margin-left: 47%;
				margin-top: 140px;
			}
			
			.dashed {
				border: 1px dashed #CCCCCC;
				border-bottom: none;
			}
			
			.huafen_xuanzhong {
				background-color: #1296DB !important;
				color: #FFFFFF !important;
			}
			
			#huafen {
				text-align: center;
			}
			
			#huafen a {
				width: 33%;
				margin-left: 5%;
			}
			/*评价区域列表*/
			
			#tourSharingUl {
				padding: 12px;
			}
			
			#tourSharingUl li {
				height: 110px;
				border-bottom: 1px solid #D4D4D4;
				box-shadow: 0px 2px 2px #DEDEDE;
				margin-bottom: 10px;
				padding: 0 10px;
			}
			
			#tourSharingUl li p {
				height: 30%;
				padding-top: 8px;
			}
			
			#tourSharingUl li p span {
				padding-left: 35px;
			}
			
			#tourSharingUl li p img {
				width: 25px;
				vertical-align: middle;
				position: absolute;
			}
			
			#tourSharingUl li p:nth-child(2) img {
				width: 27px;
				/*border: 1px solid;*/
				margin-left: -1px;
			}
			
			#tourSharingUl li p:last-child img {
				width: 27px;
				margin-left: -1px;
			}
			
			.share_tourUsername {
				font-weight: bold;
				font-size: 15px;
				width: 50%;
			}
			
			.share_tourPlace {
				color: #039702;
				font-size: 1.1em;
				font-weight: bold;
				width: 65%;
				white-space: nowrap;
				overflow: hidden;
				text-overflow: ellipsis;
			}
			
			.share_tourPlace,
			.share_tourUsername {
				float: left;
			}
			
			.share_time,
			.share_lable {
				float: right;
				color: #666666;
			}
			
			.share_time {
				width: 50%;
				font-size: 0.9em;
				text-align: right;
			}
			
			.share_lable {
				width: 35%;
				text-align: right;
			}
			
			.share_pingjia {
				color: #999999;
				float: left;
				font-size: 0.98em;
				position: relative;
				top: 2px;
				display: block;
				float: left;
				width: 100%;
				white-space: nowrap;
				overflow: hidden;
				text-overflow: ellipsis;
			}
			/* 返回顶部按钮 */
			
			.returnTopBtn {
				position: fixed;
				right: 15px;
				bottom: 80px;
				width: 45px;
				height: 43px;
				border-radius: 8px;
				z-index: 999;
				background-color: #CCCCCC;
				padding: 6px;
			}
			/*----按景点划分弹出层样式----*/
			
			#full,
			#full1,
			#full2 {
				max-width: 640px;
				min-width: 320px;
				width: 100%;
				margin: 0px auto;
				overflow: hidden;
				z-index: 1000;
			}
			
			#sharing_tanchu,
			#sharing_tanchu2,
			#add_tanchu1 {
				height: 100%;
				background-color: #FFFFFF;
			}
			
			#closeBtn i,
			.addPage_closeBtn i {
				color: #FFFFFF;
				font-size: 1.15em;
				position: relative;
				top: -6px;
				right: 8px;
			}
			
			.toolbar-inner {
				height: 70px !important;
			}
			
			.weui-row {
				background-color: #FFFFFF;
				margin-top: 15px;
			}
			/*底部弹出框的头部*/
			
			.tanchu_head {
				position: fixed;
				top: 0;
			}
			
			#full .app_head_left,
			#full1 .app_head_left {
				width: 4% !important;
			}
			
			#full .app_head_left a,
			#full1 .app_head_left a {
				margin-top: -3px;
				height: 0px;
			}
			
			#full .app_head_mid,
			#full1 .app_head_mid {
				width: 85%;
			}
			
			#full .app_head_title,
			#full1 .app_head_title {
				text-align: center;
				margin-top: 3px;
			}
			/*弹框内容部分*/
			
			.myMain {
				margin-top: 70px;
			}
			/*吉林城市列表ul li样式*/
			
			#JL_tourCity_list {
				padding: 15px 40px;
				width: 100%;
			}
			
			#JL_tourCity_list li {
				font-size: 20px;
				width: 40%;
				height: 12%;
				margin-left: 5%;
				margin-right: 5%;
				padding-top: 5.5%;
				font-size: 1.3em;
				font-family: "黑体";
				margin-top: 10%;
				/*box-shadow: 1px 2px 5px #C6F;*/
				border-radius: 50%;
				text-align: center;
				float: left;
			}
			/*城市下所有景点区域*/
			
			#tourPlace_list {
				/*padding: 8px 40px;*/
				width: 100%;
			}
			
			.tourPlace_list_title {
				border-bottom: 1px solid #DEDEDE;
				margin: 10px 15px;
				height: 40px;
			}
			
			#tourPlace_list_title_cityName {
				border-bottom: 3px solid #1296DB;
				margin-left: 15px;
				line-height: 15px;
				display: block;
				height: 39px;
				float: left;
				font-size: 1.5em;
				color: #666666;
				padding: 8px;
			}
			
			#tourPlace_list li {
				color: #444444;
				padding: 10px;
				padding-left: 25px;
				font-weight: bold;
				height: 50px;
				line-height: 28px;
				font-size: 1.16em;
			}
			
			#tourPlace_list li:nth-child(2n) {
				background-color: #EDEDED;
			}
			/*导航栏*/
			
			.weui_tab {
				width: 100%;
			}
			/*----导航栏样式----*/
			
			.weui_bar_item_on {
				background-color: #FFFFFF !important;
				color: #0070B4 !important;
			}
			
			.weui_navbar_item {
				color: #FFFFFF;
				background-color: #CCCCCC;
			}
			
			.weui_navbar_item b {
				font-size: 1.1em;
				display: block;
				height: 1.3em;
				line-height: 1.2em;
			}
			/*单个游记详情布局*/
			
			#yjMainMsg {
				width: 100%;
				height: 100%;
				padding: 15px 15px 5px 15px;
			}
			
			.yjMain_head p {
				float: left;
				width: 50%;
				height: 55px;
			}
			
			.yjMain_head p:nth-child(1) {
				text-align: left;
				line-height: 45px;
			}
			
			.yjMain_head p:nth-child(1) span {
				font-weight: bold;
				font-size: 1.2em;
				color: #039702;
				/*text-shadow: 1px 1px 1px #039702;*/
			}
			
			.yjMain_icon {
				vertical-align: middle;
				margin-right: 5px;
				width: 30px;
				box-shadow: 2px 2px 2px #039702;
				border-radius: 30px;
			}
			
			.yjMain_head p:nth-child(2) {
				text-align: right;
				color: #808080;
			}
			
			.yjMain_head p:nth-child(2) span {
				color: #808080;
				font-weight: bold;
			}
			/*游记分享单个 图片位置*/
			
			.yjMain_pic {
				width: 100%;
				text-align: center;
			}
			/*用户无图片情况下加此DIV*/
			
			.nullPic {
				margin-top: 55px;
				height: 70px;
				line-height: 70px;
				font-weight: bold;
				font-size: 1.15em;
				color: #666666;
				/*color: #039702;*/
				/*text-shadow: 1px 1px 1px #039702;*/
			}
			
			.yjMain_pic img {
				width: 31%;
				margin: 0.5%;
				height: 170px;
				box-shadow: 3px 3px 3px #808080;
			}
			
			.yjMain_notes {
				margin-top: 15px;
			}
			/*.notesTitle {
				
			}*/
			
			.notesTitle span {
				font-weight: bold;
				font-size: 1.2em;
				color: #039702;
				/*text-shadow: 1px 1px 1px #039702;*/
			}
			/*评分*/
			
			.notesScore {
				float: right;
				color: #FFC504;
				font-size: 1.15em;
				height: 35px;
				margin-top: -15px;
				position: absolute;
				right: 15%;
				padding: 0 10px;
				background-color: #FFFFFF;
			}
			
			.notesScore i {
				font-size: 1.05em;
				width: 10px;
				margin-left: 10px;
			}
			
			.notesMain {
				margin-top: 35px;
				color: #888888;
				word-break: break-all;
			}
			
			.yjMain_notes hr {
				border: 1px dashed #FFC504;
				margin-top: 25px;
				width: 100%;
				margin-left: 0;
			}
			/*添加游记分享内部样式*/
			
			.jbMain input {
				border: none;
				float: right;
				width: 95%;
				outline: none;
				border-radius: 5px;
				height: 100%;
				color: #666666;
				font-size: 17px;
				padding-left: 5px;
			}
			
			.jbMain {
				width: 80%;
				height: 45px;
				margin-left: 10%;
				border: 1px solid #999999;
				border-radius: 5px;
				margin-bottom: 30px;
				text-align: center;
				background-color: #FFFFFF;
			}
			
			.addpage_main {
				width: 100%;
				height: 100%;
				padding-top: 95px;
			}
			
			#xbText_input {
				width: 80%;
				margin-left: 10%;
				height: 80px;
				font-size: 15px;
				border: 1px solid #999999;
				color: #666666;
			}
			/*模糊查搜索框*/
			/* 搜索框区域样式 */
			
			.sec_line {
				width: 100%;
				background-color: #F5F5F5;
				padding: 5px 0px 7px 0;
				/*border-bottom: 1px solid #DEDEDE;*/
			}
			
			#InputLine {
				margin-left: 2%;
				margin-right: 2%;
				width: 96%;
				border: 1px solid #DEDEDE;
				border-radius: 7px;
				height: 44px;
				background-color: #FFFFFF;
				opacity: 0.92;
			}
			
			#roadSharing_suggestId {
				padding-left: 0.5em;
				width: 89%;
				height: 100%;
				border: none;
				outline: medium;
				border-radius: 5px;
				color: #969696;
				font-size: 1.15em;
				font-weight: bold;
			}
			
			#searchBtn {
				display: block;
				float: left;
				width: 7.5%;
				padding-right: 10px;
				color: #666666;
				font-size: 1.7em;
				text-align: right;
				margin-left: 1.5%;
				margin-top: 2px;
			}
			
			.noMoreData {
				position: absolute;
				bottom: -5px;
				color: #666666;
				text-align: center;
				width: 100%;
			}
		</style>
	</head>

	<body ontouchstart>
		<div class="roadSharing_main" id="roadSharing_main">
			<div class="index_head">
				<div class="app_head_left">
					<a onclick="roadSharingReturnBtn()" class="iconfont">&#xe6d4;</a>
				</div>
				<div class="app_head_mid">
					<p class="app_head_title">路况共享</p>
				</div>
				<div class="app_head_right">
					<img src="img/roadsharing/new_roadSharing.png" onclick="jumpToNewSharing()" />
				</div>
			</div>
			<div class="weui_tab">

				<!--选择车站列表亦或吉林省内所有车站-->
				<div class="weui_navbar" id="stationNavbar">
					<a href="#yjList" id="btn1" class="weui_navbar_item weui_bar_item_on">
						<b>查询列表</b>
					</a>
					<a href="#yjMain" id="btn2" class="weui_navbar_item">
						<b>路况详情</b>
					</a>
				</div>
				<div class="weui_tab_bd">
					<div id="yjList" class="weui_tab_bd_item weui_tab_bd_item_active">
						<div class="sec_line">
							<div id="InputLine">
								<input type="text" maxlength="20" id="roadSharing_suggestId" placeholder="输入关键字查找（如路名）" onkeyup="searchRoad()" />
								<!--<a id="delBtn" href="javascript:;" class="iconfont" style="display: none;">&#xe60b;</a>-->
								<a id="searchBtn" href="javascript:;" class="iconfont">&#xe709;</a>
							</div>
						</div>
						<ul id="tourSharingUl">
							<img src="img/my/nullSharing.png" style="display: none;" id="nullDataImg" />
							<!--<img src="img/taxi/loading_icon.gif" id="sharingLoadingIcon" style="display: none;" />-->
							<!--dom添加li-->
							<!--<p class="noMoreData">没有更多数据啦!</p>-->
							<div class="weui-infinite-scroll" id="ulMore_loading">
								<div class="infinite-preloader"></div>
								正在加载...
							</div>
						</ul>

					</div>
					<div id="yjMain" class="weui_tab_bd_item">
						<!--显示每条分享的详情信息-->
						<div id="yjMainMsg" style="display: none;">
							<div class="yjMain_head">
								<p>
									<img class="yjMain_icon" src="img/roadsharing/roadSharing_man.png" />
									<span id="yjD1"></span>
								</p>
								<p>
									发表于<br />
									<span id="yjD2"></span>
								</p>
							</div>
							<div class="yjMain_pic" id="yjD3">
								<!--评论分享图片区域-->
								<div class="nullPic">
									用户未上传图片哦
								</div>
							</div>
							<div class="yjMain_notes">
								<p class="notesTitle"><img class="yjMain_icon" src="img/roadsharing/roadSharing_point.png" /><span id="yjD4"></span></p>
								<!--<hr />-->
								<!--<p class="notesScore">评分<i class="iconfont" id="yjD5"></i></p>-->
								<p class="notesMain" id="yjD6"></p>
							</div>
						</div>
					</div>
				</div>

			</div>
		</div>
		<img src="img/index/returnTop2.png" style="display: none;" class="returnTopBtn" />
		<div class="fakeloader"></div>
		<script src="js/jquery-1.11.0.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/weui/jquery-weui.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/md5.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/back_end.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/JL_city.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/loadingJs/fakeloader.min.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			var more = 1;
			//			//保存路况共享信息
			//type = save_road_share
			//ROADNAME = 路段名称
			//USERNAME = 用户名称
			//DESCRIBE = 路况描述
			//PICTURE1 = 图片1
			//PICTURE2 = 图片2 
			//PICTURE3 = 图片3
			var h = document.documentElement.clientHeight; //获取屏幕高度

			//返回按钮
			function tourShareReturnBtn() {
				if($("#btn1").hasClass("weui_bar_item_on")) { //当页面在列表展示页时
					window.location.href = "javascript:history.go(-1)";
				} else {
					//					$("#btn1").click(); //回到列表展示页
					//					$("#yjMainMsg").hide();
					window.location.reload();
				}
			}

			//路况共享输入框时间延迟
			var timeout;

			function searchRoad() {
				$(".noMoreData").remove();
				$("#tourSharingUl li").remove();
				clearTimeout(timeout);
				timeout = setTimeout("getRoadsMsg()", 500);
			}

			//路况共享模糊查询
			function getRoadsMsg() {
				more = 1; //输入框发生输入事件后 more值重新回到1
				pageLoadingMore();
				getTourSharing($("#roadSharing_suggestId").val(), more);
			}

			//跳转至用户分享路况信息页
			function jumpToNewSharing() {
				if(!localStorage.userJson) {
					$.confirm("发表路况共享请您先登录", "提示", function() {
						window.location.href = "Login.html";
					});
				} else {
					window.location.href = "./moreHtml/add_lkgx.html";
				}
			} //返回按钮
			function roadSharingReturnBtn() {
				if($("#btn1").hasClass("weui_bar_item_on")) { //当页面在列表展示页时
					window.location.href = "my.html";
				} else {
					//					$("#btn1").click(); //回到列表展示页
					//					$("#yjMainMsg").hide();
					window.location.reload();
				}
			}

			function pageLoadingMore() {
				var loading = false; //状态标记
				$(document.body).infinite().on("infinite", function() {
					if(loading) return;
					loading = true;
					setTimeout(function() {
						more++;
						//						console.log(more);
						getTourSharing($("#roadSharing_suggestId").val(), more);
						loading = false;
					}, 1500); //模拟延迟 
				});
			}

			$(function() {
				pageLoadingMore();
				getTourSharing("", 1);
				//				$("#huafenBtn").click();
			});

			//回到顶部功能
			window.onscroll = function() {
				var scroll_top = $(document).scrollTop();
				if(scroll_top != 0) {
					$(".returnTopBtn").show();
				} else if(scroll_top == 0) {
					$(".returnTopBtn").hide();
				}
			};
			//每当点击地图按钮的时候，页面都返回顶部
			$(".returnTopBtn").click(function() {
				$("body").animate({
					scrollTop: 0
				}, 300) //0.3秒回到顶部动画效果
			});

			//获取路况共享分享方法
			function getTourSharing(Roadname, more) {
				//type = get_road_share
				//ROADNAME = 道路名称
				//PAGECURRENT = 当前页
				//PAGESIZE = 页面大小
				//FLAG = 标识（默认为网页“1”，手机端为“2“）
				//				$("#sharingLoadingIcon").show();
				$(".noMoreData").remove();
				$("#ulMore_loading").show()
				$("#nullDataImg").hide();
				$.ajax({
					type: "post",
					url: Url,
					data: {
						"type": "get_road_share",
						"ROADNAME": Roadname, //道路名称
						"PAGECURRENT": more,
						"PAGESIZE": 10,
						"FLAG": 2 //手机端
					},
					async: false,
					cache: false,
					dataType: "jsonp", //数据类型为jsonp
					jsonp: "callbackparam", //服务端用于接收callback调用的function名的参数  
					jsonpCallback: "jsonpCallback1",
					success: function(data) {
						//						console.log(data);
						if(data.CODE == "1") {
							var d = data.DATA;
							var m = data.MDATA;
							var num = data.COUNT;
							if(isEncrypt(d, m)) {
								d = eval(d);
								for(var i = 0; i < d.length; i++) {
									var userstr1 = d[i].STDNAME.substr(0, 3);
									var userstr2 = d[i].STDNAME.substr(7);
									var user = userstr1 + "****" + userstr2; //用户手机号,隐藏中间4位
									var place = d[i].ROADNAME; //景点名称
									var notes = d[i].TRAFFIC_DESCRIBE; //游记内容文字
									var time = d[i].SUBMITTIME.substring(0, 16); //游记发表时间
									var thisId = d[i].RECID; //此评论的唯一标识
									var hasPic = d[i].ISPICTURE == "" ? false : true;
									var li = $('<li onclick="tourOneNotes(this)" data-pic="' + hasPic + '" data-recid="' + thisId + '"></li>');
									var p1 = $('<p><img src="img/roadsharing/roadSharing_man.png" /><span class="share_tourUsername">' + user + '</span><span class="share_time">' + time + '</span></p>');
									var p2 = $('<p><img src="img/roadsharing/roadSharing_point.png" /><span class="share_tourPlace">' + place + '</span><span class="share_lable">点击查看</span></p>');
									var p3 = $('<p><img src="img/roadsharing/roadSharing_notes.png" /><span class="share_pingjia">' + notes + '</span></p>');
									$("#ulMore_loading").before(li);
									$(li).append(p1, p2, p3);
								}
								if($("#tourSharingUl li").length == num) {
									$(document.body).destroyInfinite(); //销毁上拉刷新
									$("#ulMore_loading").hide();
									var p = $('<p class="noMoreData">没有更多数据啦!</p>');
									$("#ulMore_loading").before(p);
								}

							} else {
								errMD();
							}
						} else {
							$("#ulMore_loading").hide(); //隐藏上拉刷新
							if($("#tourSharingUl li").length == 0) {
								$("#nullDataImg").show(); //显示暂无数据图片
							}
						}
					},
					error: function(data) {
						//						$.alert("连接超时，请检查网络设置", "提示");
					}
				});
			}

			//展示吉林所有城市列表 方法
			function getJLcityAll() {
				$("#JL_tourCity_list").height(h - 100);
				var citys = $("#JL_tourCity_list li");
				for(var i = 0; i < citys.length; i++) {
					var shadowStr = getRandomColor();
					var colorStr = shadowStr.substr(12);
					$(citys[i]).css("box-shadow", shadowStr); //随机颜色边框阴影
					$(citys[i]).css("color", colorStr); //随机颜色字体					
				}
			}

			//选取城市点击事件
			$("#JL_tourCity_list li").click(function() {
				var cityName = $(this).html(); //所选城市名
				var cityVal = $(this).attr("value"); //所选城市的拼音
				$("#JL_tourCity_list").hide(200);
				$("#tourPlace_list").show(200);
				$("#title_jdCity").hide();
				$("#title_jd").show();
				$("#tanchuReturnBtn").show();
				$("#tourPlace_list_title_cityName").html(cityName);
				$("#tourPlace_list li").remove();
				getCityTourPlace(cityVal);
			});

			//弹出框右上角的后退按钮
			$("#tanchuReturnBtn").click(function() {
				$("#tourPlace_list").hide(200);
				$("#JL_tourCity_list").show(200);
				$("#title_jd").hide();
				$("#title_jdCity").show();
				$(this).hide();
			});

			//点击关闭弹窗按钮
			$("#closeBtn i").click(function() {
				$("#returnMainBtn").click();
				$("#full").slideToggle(200);
			});

			//获取单个评论的详情
			//type=single_travel_notes
			//RECID=行标识
			function tourOneNotes(t) {
				var has_pic = $(t).attr("data-pic");
				//				console.log(has_pic);
				if(has_pic == "true") {
					$(".fakeloader").fakeLoader({
						timeToHide: 3000,
						bgColor: "#1296DB",
						spinner: "spinner3"
					});
				} else {
					$(".fakeloader").fakeLoader({
						timeToHide: 300,
						bgColor: "#1296DB",
						spinner: "spinner3"
					});
				}

				$(".nullPic").hide();
				$("#btn2").click();
				var r = $(t).attr("data-recid");
				////获取单个路况共享信息
				//type = single_road_share
				//RECID = 路况标识
				$.ajax({
					type: "post",
					url: Url,
					data: {
						"type": "single_road_share",
						"RECID": r
					},
					async: false,
					cache: false,
					dataType: "jsonp", //数据类型为jsonp
					jsonp: "callbackparam", //服务端用于接收callback调用的function名的参数  
					jsonpCallback: "jsonpCallback1",
					success: function(data) {
						if(data.MSG == "成功") {
							var d = data.DATA;
							var m = data.MDATA;
							if(isEncrypt(d, m)) {
								d = eval(d)[0];
								//								console.log(d);
								var user1 = d.STDNAME.substr(0, 3);
								var user2 = d.STDNAME.substr(7);
								var user = user1 + "****" + user2; //手机号
								var notes = d.TRAFFIC_DESCRIBE; //分享内容
								var picArr = [d.PICTURE1, d.PICTURE2, d.PICTURE3]; //图片数组
								var place = d.ROADNAME; //地点路段名称
								var time = d.SUBMITTIME.substr(0, 16); //评论时间 年月日时分
								//数据展示
								$("#yjD1").html(user); //添加用户名
								$("#yjD2").html(time); //添加发表时间
								getThreePic(picArr); //添加图片
								$("#yjD4").html(place); //添加景点名
								$("#yjD6").html(notes);
								$("#yjMainMsg").slideDown(500);
							} else {
								errMD();
							}
						} else {
							$.alert("暂无数据", "提示");
						}
					},
					error: function(data) {
						$.alert("连接超时，请检查网络设置", "提示");
					}
				});
			}

			//获取评分星星字符串
			function getStarStr(s) {
				var starF = "&#xe6ff;";
				var starE = "&#xe702;";
				var starStr = "";
				for(var i = 0; i < s; i++) {
					starStr += starF;
				}
				for(var j = 0; j < 5 - s; j++) {
					starStr += starE;
				}
				return starStr;
			}
			//获取1-3张图片方法
			function getThreePic(arr) {
				$("#yjD3 img").remove(); //清空原有图片
				if(arr[0] == "") {
					$(".nullPic").show();
				} else {
					for(var i = 0; i < arr.length; i++) {
						if(arr[i] != "") {
							var img = $('<img src="' + arr[i] + '"/>');
							$("#yjD3").append(img);
						}
					}
				}
			}
		</script>
	</body>

</html>